/*jQuery(document).ready(function() {  alert("aqui");
	jQuery("#list").jqGrid({
		editurl: '/PatologiaOcular/usuario/listarUsuario.action', 
		url: '/PatologiaOcular/usuario/borrarUsuario.action',   
		datatype: 'json',  
		mtype: 'POST',   
		colNames: ['ID', 'Nombre', 'Apellido', 'Nombre de Usuario', 'Acciones'],  
		colModel: [     
		          { name: 'id', index: 'id', width: 75, sortable: false },    
		          { name: 'nombre', index: 'nombre', width: 300, align: 'left',editable: true},     
		          { name: 'apellido', index: 'apellido', width: 100, align: 'left', editable: true },     
		          { name: 'nombreUsuario', index: 'nombreUsuario', width: 100, align: 'left', editable: true },   
		          { name: 'acciones', index: 'acciones', width: 100, align: 'left', editable: true },   
		          ],         
		          
		          gridComplete: function () {         
		        	  var ids = jQuery("#list").jqGrid('getDataIDs');        
		        	  for (var i = 0; i < ids.length; i++) {           
		        		  var cl = ids[i];                 
		        		  be = "<input type='button' class='boton3' onclick=\"jQuery('#list').saveRow('" + cl + "');\"  />";           
		        		 // se = "<input type='button' onclick=\"jQuery('#list').saveRow('" + cl + "');\"  />";       
		        		 // ce = "<input type='button' onclick=\"jQuery('#list').restoreRow('" + cl + "');\" />";      
		        		  jQuery("#list").jqGrid('setRowData', ids[i], { act: be });       //+ se + ce 
		        	  } 
		          },    
		pager: '#pager',      
		rowNum: 10,  
		rowList: [5, 10, 20, 50],       
		sortname: 'Id',      
		sortorder: "desc",     
		viewrecords: true,    
		//caption: 'My first grid'   
	});    
	$("#list").navGrid("#pager", { edit: false, add: false, del: false });  
});
*/
jQuery(document).ready(function () {
jQuery.struts2_jquery.require("js/struts2/jquery.grid.struts2-3.2.1"+jQuery.struts2_jquery.minSuffix+".js");
var options_gridmultitable = {};
var options_gridmultitable_colmodels = new Array();
var options_gridmultitable_colnames = new Array();

options_gridmultitable_colmodels_id = {};
options_gridmultitable_colmodels_id.name = "id";
options_gridmultitable_colmodels_id.jsonmap = "id";
options_gridmultitable_colmodels_id.index = "id";
options_gridmultitable_colmodels_id.formatter = "integer";
options_gridmultitable_colmodels_id.editable = false;
options_gridmultitable_colmodels_id.sortable = false;
options_gridmultitable_colmodels_id.resizable = true;
options_gridmultitable_colmodels_id.search = true;
options_gridmultitable_colmodels_id.hidden = true;
options_gridmultitable_colnames.push("ID");
options_gridmultitable_colmodels.push(options_gridmultitable_colmodels_id);
options_gridmultitable_colmodels_nombre = {};
options_gridmultitable_colmodels_nombre.name = "nombre";
options_gridmultitable_colmodels_nombre.jsonmap = "nombre";
options_gridmultitable_colmodels_nombre.index = "nombre";
options_gridmultitable_colmodels_nombre.editable = false;
options_gridmultitable_colmodels_nombre.sortable = false;
options_gridmultitable_colmodels_nombre.resizable = true;
options_gridmultitable_colmodels_nombre.search = true;
options_gridmultitable_colnames.push("Nombre");
options_gridmultitable_colmodels.push(options_gridmultitable_colmodels_nombre);
options_gridmultitable_colmodels_apellido = {};
options_gridmultitable_colmodels_apellido.name = "apellido";
options_gridmultitable_colmodels_apellido.jsonmap = "apellido";
options_gridmultitable_colmodels_apellido.index = "apellido";
options_gridmultitable_colmodels_apellido.editable = false;
options_gridmultitable_colmodels_apellido.sortable = false;
options_gridmultitable_colmodels_apellido.resizable = true;
options_gridmultitable_colmodels_apellido.search = true;
options_gridmultitable_colnames.push("Apellido");
options_gridmultitable_colmodels.push(options_gridmultitable_colmodels_apellido);
options_gridmultitable_colmodels_nombreUsuario = {};
options_gridmultitable_colmodels_nombreUsuario.name = "nombreUsuario";
options_gridmultitable_colmodels_nombreUsuario.jsonmap = "nombreUsuario";
options_gridmultitable_colmodels_nombreUsuario.index = "nombreUsuario";
options_gridmultitable_colmodels_nombreUsuario.editable = false;
options_gridmultitable_colmodels_nombreUsuario.sortable = false;
options_gridmultitable_colmodels_nombreUsuario.resizable = true;
options_gridmultitable_colmodels_nombreUsuario.search = true;
options_gridmultitable_colnames.push("Nombre de Usuario");
options_gridmultitable_colmodels.push(options_gridmultitable_colmodels_nombreUsuario);
options_gridmultitable_colmodels_acciones = {};
options_gridmultitable_colmodels_acciones.name = "acciones";
options_gridmultitable_colmodels_acciones.jsonmap = "acciones";
options_gridmultitable_colmodels_acciones.index = "acciones";
options_gridmultitable_colmodels_acciones.formatter = formatLink;
options_gridmultitable_colmodels_acciones.editable = false;
options_gridmultitable_colmodels_acciones.sortable = false;
options_gridmultitable_colmodels_acciones.resizable = true;
options_gridmultitable_colmodels_acciones.search = true;
options_gridmultitable_colnames.push("Acciones");
options_gridmultitable_colmodels.push(options_gridmultitable_colmodels_acciones); 
options_gridmultitable.datatype = "json";
options_gridmultitable.url = "/PatologiaOcular/resources/listarUsuario.action";
options_gridmultitable.editurl = "/PatologiaOcular/resources/borrarUsuario.action";
options_gridmultitable.page = 1;
options_gridmultitable.height = 'auto';
options_gridmultitable.pager = "gridmultitable_pager";
options_gridmultitable.pgbuttons = true;
options_gridmultitable.pginput = true;
options_gridmultitable.rowNum = 10;
options_gridmultitable.rowList = [10,15,20];
options_gridmultitable.autowidth = true;
options_gridmultitable.navigator = true;
options_gridmultitable.navigatordeleteoptions = {height:280,reloadAfterSubmit:true};
options_gridmultitable.navigatoradd = false;
options_gridmultitable.navigatordel = true;
options_gridmultitable.navigatoredit = false;
options_gridmultitable.navigatorrefresh = false;
options_gridmultitable.navigatorsearch = false;
options_gridmultitable.navigatorview = false;
options_gridmultitable.multiselect = true;
options_gridmultitable.autoencode = true;
options_gridmultitable.hidegrid = false;
options_gridmultitable.onselectrowtopics = "rowselect";
options_gridmultitable.colNames = options_gridmultitable_colnames;
options_gridmultitable.colModel = options_gridmultitable_colmodels;
options_gridmultitable.jsonReader = {};
options_gridmultitable.jsonReader.root = "gridModel";
options_gridmultitable.jsonReader.page = "page";
options_gridmultitable.jsonReader.total = "total";
options_gridmultitable.jsonReader.records = "records";
options_gridmultitable.jsonReader.repeatitems = false;
options_gridmultitable.jqueryaction = "grid";
options_gridmultitable.id = "gridmultitable";
jQuery.struts2_jquery_grid.bind(jQuery('#gridmultitable'),options_gridmultitable);
});